<?php
require_once 'models/catalog.inc';
require_once 'models/orm.inc';

class TMSProductImageModel extends  TCandyModel {
	protected function afterConstruct(){
		$this->_conf_classname_ = 'TMSProductImage';
	}
	
	protected function beforeSave(TNOrmObject $object){
		if (!isset($object->OrderNumber))
			$object->OrderNumber = 0;
		return $object;
	}
	
	protected function postProcessProperties(){
		parent::postProcessProperties();
		$this->propertyMetas['Nomenclature']->ReadOnly = true;
	}
}